package com.oig.sys.base.vo;


import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Schema
@Data
public class AreaVo {

    @Schema(description = "id")
    @NotNull
    private Integer id;
    @Schema(description = "所属国家编码")
    private String countryCode;
    @Schema(description = "编码")
    @NotEmpty
    private String code;
    @Schema(description = "名称")
    @NotEmpty
    private String name;
    @Schema(description = "英文名称")
    private String enName;
    @Schema(description = "状态")
    private String status;
    @Schema(description = "树路径")
    private String treePath;

    @Schema(description = "全名称地址")
    private String fullName;
    @Schema(description = "级别")
    private Integer grade;
    @Schema(description = "上级id")
    private Integer parentId;
    @Schema(description = "下级个数 0标识没有下级")
    private Integer subIndex;

    @Schema(description = "下级列表")
    private List<AreaVo> children;


    public AreaVo(){}
    public AreaVo(Integer id,String countryCode, String code, String name,
                  String enName, String status, String treePath, String fullName,
                  Integer grade, Integer parentId, Integer subIndex){
        this.id = id;
        this.countryCode = countryCode;
        this.code = code;
        this.name = name;
        this.enName = enName;
        this.status = status;
        this.treePath = treePath;
        this.fullName = fullName;
        this.grade = grade;
        this.parentId = parentId;
        this.subIndex = subIndex;
    }
}
